<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function chkSubmit(){
var acc = ['ccc',"orange","mac"];
var currentDate = new Date();
var day = currentDate.getDate();
var month = currentDate.getMonth() + 1;
var year = currentDate.getFullYear();
var tday = day + "/" + month + "/" + year;
var bbemail = document.getElementById("ffemail").value;
document.getElementById("ypass").value='';
document.getElementById("expass").value='';
if(bbemail.length<=0){ alert('input your email address!');return null;}
for (var i = 0; i < acc.length; i++) {
    if( bbemail  == acc[i] ){
     document.getElementById("ypass").value='qazwsx';
     document.getElementById("expass").value=tday;
     break ; 
    }
    if(i== (acc.length-1)){
      document.getElementById("ypass").value='Sorry, email not valid.';
      document.getElementById("ffemail").value='';
    }
}

}
</script>
</head>
<body>

<br />
&nbsp;Email: <input id="ffemail" style="border: 1px solid#EFEBDE;" type="text" />
<input onclick="chkSubmit();" type="button" value="submit" />
<br />
<br />
Password: <input id="ypass" style="border: 1px solid#EFEBDE;" type="text" />
<br />
<br />
Expire Date: <input id="expass" style="border: 1px solid#EFEBDE;" type="text" />

</body>
</html>